﻿using AutoMapper;
using Tolo.SimplePG.Entities.Books;
using Tolo.SimplePG.Services.Dtos.Books;

namespace Tolo.SimplePG.ObjectMapping;

public class SimplePGAutoMapperProfile : Profile
{
    public SimplePGAutoMapperProfile()
    {
        CreateMap<Book, BookDto>();
        CreateMap<CreateUpdateBookDto, Book>();
        CreateMap<BookDto, CreateUpdateBookDto>();
        CreateMap<AuthorDto, Author>().ReverseMap();
        CreateMap<PublisherDto, Publisher>().ReverseMap();
        /* Create your AutoMapper object mappings here */
    }
}
